<template>
	<view>
		<u-navbar :title="title1" :autoBack="true" placeholder></u-navbar>
		<!-- #ifdef H5 -->
			<u-sticky bgColor="#f9f9f9" customNavHeight="44" offsetTop="0">
			<!-- #endif -->
			<!-- #ifndef H5 -->
			<u-sticky bgColor="#f9f9f9" customNavHeight="44" offsetTop="44">
			<!-- #endif -->
			<view class="head">
				<image src="" class="head__logo" mode=""></image>
				<u-search placeholder="搜索从来都是那么简单" :showAction='false' v-model="keyword" height="70rpx"></u-search>
			</view>
		</u-sticky>
		<view class="con" v-if="!keyword">
			<view class="con__box">
				<view class="con__box__title">
					{{title1}}校果今日热榜
				</view>
				<view class="con__box__item" v-for="(item,index) in 10" :key="index" @click="navto('/pages/contxt/details')">
					<image v-if="index<3" :src="'/static/home/index'+(index+1)+'.png'" class="con__box__item__indexicon" mode=""></image>
					<view class="con__box__item__index" v-else>
						{{index+1}}
					</view>
					<view class="con__box__item__text">
						首先声明本人对学校没有意见，只是对学校的-…
					</view>
				</view>
			</view>
			
		</view>
		<view class="list" v-else>
			<contentitem v-for="(item,index) in list" :item='item' :key="index" @dz='dz(item,index)'></contentitem>
		</view>
		<wanshan ref="wanshan"></wanshan>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyword:'',
				list: [{
						pics: 3,
						isdz: false
					},
					{
						pics: 0,
						isdz: true
					},
					{
						pics: 2,
						isdz: false
					},
					{
						pics: 6,
						isdz: false
					}
				]
			};
		},
		methods:{
			dz(item, index) {
				// 判断是否完善
				if(!this.mobile){
					this.$refs.wanshan.open()
					return
				}
				item.isdz = !item.isdz
				this.$forceUpdate()
			}
		}
	}
</script>

<style lang="scss">
page{
	background-color: #f9f9f9;
}
.head{
	padding: 80rpx 57rpx 50rpx;
	background-color: #fff;
	&__logo{
		width: 125rpx;
		height: 124rpx;
		background: #07BC5F;
		border-radius: 11rpx 11rpx 11rpx 11rpx;
		margin-left: 254rpx;
		margin-bottom: 37rpx;
	}
}
.con{
	
	padding: 30rpx 23rpx 0 11rpx;
	&__box{
		background: linear-gradient(to right, #f9f9f9 0%, #FEF2F2 100%);
		padding: 0 30rpx 10rpx;
		&__title{
			font-family: PingFang-SC, PingFang-SC;
			font-weight: 800;
			font-size: 36rpx;
			color: #E2636A;
			line-height: 36rpx;
			padding: 46rpx 0;
		}
		&__item{
			display: flex;
			align-items: center;
			margin-bottom: 38rpx;
			&__indexicon{
				width: 35.71rpx;
				height: 48.81rpx;
				margin-right: 8rpx;
			}
			&__index{
				display: flex;
				align-items: center;
				justify-content: center;
				width: 35.71rpx;
				height: 48.81rpx;
				margin-right: 8rpx;
				font-family: DINNextLTPro, DINNextLTPro;
				font-weight: 500;
				font-size: 31rpx;
				color: #90939A;
			}
			&__text{
				width: 579rpx;
				font-family: PingFang-SC, PingFang-SC;
				font-weight: 500;
				font-size: 27rpx;
				color: #1C161A;
			}
		}
	}
}
.list{
	padding:0 30rpx;
	background-color: #fff;
	margin-top: 20rpx;
}
</style>
